package com.hzit.loan.pay.factory;

import com.hzit.loan.pay.service.IPayStrategyService;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 支付策略工厂
 */
public class PayStrategyFactory {

    public static ConcurrentHashMap<String,IPayStrategyService> concurrentHashMap = new ConcurrentHashMap<String,IPayStrategyService>();


    /**
     * 根据payWay获取不同的策略实现类
     * @param payWay
     * @return
     */
    public static IPayStrategyService getPayStrategy(String payWay){
        return concurrentHashMap.get(payWay);
    }
}
